|
|
GMC_API_EXPORT void | GmLogInit () |
| | Initializes the logging facilities.
|
| |
|
GMC_API_EXPORT bool | GmSetConsoleLogging (bool mode) |
| | Enables or disables logging to the console. Returns the previous mode.
|
| |
| GMC_API_EXPORT void | GmSetLogFile (QString logfile, bool flush, const GmLogCategory &logger) |
| | Enables and configures file logging.
|
| |
|
GMC_API_EXPORT void | GmCloseLogFile () |
| | Closes the log file if enabled.
|
| |
|
GMC_API_EXPORT void | GmFlushLogFile () |
| | Flushes the log file if enabled.
|
| |
|
GMC_API_EXPORT bool | GmSetShowLoggerName (bool mode) |
| | Enables or disables showing the logger name before each message. Returns the previous mode.
|
| |
|
GMC_API_EXPORT bool | GmSetShowThreadId (bool mode) |
| | Enables or disables showing the thread id before each message. Returns the previous mode.
|
| |
|
GMC_API_EXPORT bool | GmSetHideRepeatedWarnings (bool mode) |
| | Enables or disables skipping repeated warning messages. Returns the previous mode.
|
| |
|
GMC_API_EXPORT void | GmSetLogLevels (const QList< QPair< QString, bool > > &rules) |
| | Load a new set of logging rules from a rules list. Adds the no qt rules option on top of the given ones.
|
| |
| GMC_API_EXPORT void | GmSetLogLevels (LuaTable &tab, const QList< QPair< QString, bool > > &extraRules, const GmLogCategory &logger) |
| | Load a new set of logging rules from table tab, using logger to emmit warnings in case of errors on the table.
|
| |
|
GMC_API_EXPORT bool | GmLoggerDecorations (void) |
| | Returns the current logger decoration mode. When set to true, code logging value tables should add decorations to aid regression tests.
|
| |
|
GMC_API_EXPORT bool | GmSetLoggerDecorations (bool mode) |
| | Updates the current logger decoration mode. Returns the previous mode.
|
| |
| GMC_API_EXPORT bool | GmSetStringListLogging (bool mode, QStringList *targetList=NULL) |
| | Enables or disables logging to a string list. This is useful for capturing messages for testing purposes.
|
| |
|
GMC_API_EXPORT const QStringList & | GmLogStringList () |
| | Returns the logging string list (has contents only if GmSetStringListLogging(true) was called before)
|
| |
|
GMC_API_EXPORT const QObject * | GmSetLoggingSignal (bool enable) |
| | Enables or disables logging to the logMessage signal. Returns the object that will be used to emit the signal.
|
| |
|
GMC_API_EXPORT void | GmLogWrappedMsg (const GmLogCategory &logger, GmLogLevel level, const QString &msg, int maxSize=120, int maxBreak=30) |
| | Logs the given message breaking lines bigger than maxSize. Message breaking is preferentially done on spaces but can end up being done anywhere if there is no space in the last maxBreak characters.
|
| |
|
GMC_API_EXPORT void | GmLogIdent (int offset) |
| | Changes the current identation level.
|
| |
|
GMC_API_EXPORT int | GmLogIdentClear () |
| | Clears the current identation level, returning the old one.
|
| |
|
GMC_API_EXPORT void | GmLogMemoryUsage (const GmLogCategory &logger, const QString &msg) |
| | Log the current memory usage and the difference from the last call to GmLogMemoryUsage that printed something (on the first call, gives the difference from the amount of memory in use when the memory manager was initialized in the GmLogInit() function.
|
| |
|
GMC_API_EXPORT QString | GmLogFormatMemory (size_t s) |
| | Return a string with the memory size converted to kB, MB or GB, adding the unit to the converted (if needed) value.
|
| |
|
GMC_API_EXPORT const GmLogCategory & | GmPanicLogger () |
| | Returns the global "panic" logger, usually used to report memory allocation fails deep inside class structures with no easy access to another logger.
|
| |
Declaration of support functions and macros for information logging.
- Author
- Carlos Augusto Teixeira Mendes
- Date
- october, 2014
Load a new set of logging rules from table tab, using logger to emmit warnings in case of errors on the table.
The table should be a list following the following syntax example: tab = {{'gema.simLoader.info', true }, {'.trace', false}, {'gema.simLoader.', true }, } Loaded rules are applied on top of the default ruels set in GmLogInit() Extra rules in 'extraRules' are applied on top of the Lua table rules and can be used to override some of those config file options.
Enables or disables logging to a string list. This is useful for capturing messages for testing purposes.
If targetList is different from NULL, the supplied list will be used to store log messages. Otherwise an internal list will be used. This parameter is relevant only when turning list logginng on.
When logging is disabled, if the target list is the internal list, it is also cleared. Returns the previous mode.